Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@electron/packager

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@electron/packager

Customize and package your Electron app with OS-specific bundles (.app, .exe, etc.) via JS or CLI

  • 18.3.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
132K
increased by2.06%
Maintainers
1
Weekly downloads
 
Created

What is @electron/packager?

@electron/packager is a tool that helps you package and distribute Electron applications. It simplifies the process of creating executables for different operating systems from your Electron app source code.

What are @electron/packager's main functionalities?

Packaging for Different Platforms

This feature allows you to package your Electron app for different platforms such as Windows, macOS, and Linux. The code sample demonstrates how to package an app for Windows 64-bit.

const packager = require('electron-packager');

packager({
  dir: './app',
  out: './build',
  platform: 'win32',
  arch: 'x64'
}).then(appPaths => console.log(`Packaged to ${appPaths}`));

Customizing the Build

You can customize the build process by specifying options like the application icon, whether to overwrite existing builds, and more. The code sample shows how to set a custom icon and enable overwriting.

const packager = require('electron-packager');

packager({
  dir: './app',
  out: './build',
  icon: './icon.ico',
  overwrite: true
}).then(appPaths => console.log(`Packaged to ${appPaths}`));

Pruning Development Dependencies

This feature allows you to prune development dependencies from the final package, reducing the size of the application. The code sample demonstrates how to enable pruning.

const packager = require('electron-packager');

packager({
  dir: './app',
  out: './build',
  prune: true
}).then(appPaths => console.log(`Packaged to ${appPaths}`));

Other packages similar to @electron/packager

Keywords

FAQs

Package last updated on 12 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc